package com.qin.mall.openfeign.order;

import com.qin.mall.common.api.CommonResult;
import com.qin.mall.common.api.MyBatisPlusPage;
import com.qin.mall.domain.OmsOrderReturnApply;
import com.qin.mall.dto.OmsReturnApplyQueryParam;
import com.qin.mall.dto.OmsUpdateStatusParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 订单退货申请管理远程调用
 * @author Leisure
 * create 2022 2022/11/22 8:45
 **/
@FeignClient("order-manage")
public interface OmsOrderReturnApplyFeigin {

    /**
     * 分页条件查询申请
     */
    @PostMapping("/return/list")
    public CommonResult<MyBatisPlusPage<OmsOrderReturnApply>> list(@RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum,
                                                                   @RequestParam(value = "pageSize",defaultValue = "5")Integer pageSize,
                                                                   @RequestBody OmsReturnApplyQueryParam queryParam);

    /**
     * 批量删除申请
     */
    @PostMapping("/return/delete")
    public CommonResult delete(@RequestParam("ids") List<Long> ids);

    /**
     * 修改申请状态
     */
    @PostMapping("return/update/status/{id}")
    @ResponseBody
    public CommonResult updateStatus(@PathVariable Long id,
                                     @RequestBody OmsUpdateStatusParam statusParam);
    /**
     * 获取指定申请详情
     */
    @GetMapping("/return/{id}")
    public CommonResult getItem(@PathVariable Long id);
    
    
}
